package com.xxpt.common.exception;

/**
 * 业务异常
 * @Author masl - 2018/6/30 0030 18:07
 */
public class BussinessException extends RuntimeException {
    private String code;

    public BussinessException(ErrorCode errorCode) {
        super(errorCode.getDesc());
        this.code = errorCode.getCode();
    }

    public BussinessException(String code, String msg) {
        super(msg);
        this.code = code;
    }

    public BussinessException(String message) {
        super(message);
    }

    public String getCode() {
        return this.code;
    }
}
